iptables查询方式 | 您所在的位置:网站首页 › iptables -nvL INPUT › iptables查询方式 |
1、查看iptables指定表的规则
1、查看filter表中的规则: iptables -t filter -L 该语句结果会显示三条链,分别是INPUT、FORWARD、OUTPUT 2、查看raw表中的规则: iptables -t raw -L raw中的链为PREROUTING和OUTPUT 3、查看mangle表中的规则: iptables -t mangle -L mangle中的链为PREROUTING、INPUT、FORWARD、OUTPUT、POSTROUTING 4、查看nat表中的规则: iptables -t nat -L nat中的链为PREROUTING、POSTROUTING、OUTPUT 5、由上面的四条规则我们可以得出规律,iptables -t tables_name -L 可以查询出指定的表名的规则。其中如果只是iptables -L命令的时候,默认查询的就是filter表中的规律:即iptables -t filter -L 语法格式: iptables -t [tables_name] -L [chain_name] 如:查看filter表中的INPUT链,查询语句为: iptables -t filter -L INPUT或iptables -L INPUT,如果需要显示详细信息,可以适应iptables -vL INPUT的方式
|
CopyRight 2018-2019 实验室设备网 版权所有 |